// src/store/index.ts

import { configureStore } from "@reduxjs/toolkit";
import userReducer from "./modules/userSlice";
import settingsReducer from "./modules/settingsSlice";

export const store = configureStore({
  reducer: {
    user: userReducer,
    settings: settingsReducer,
    // 如果有其他模块，可继续按需添加
  },
});

// Infer the `RootState` and `AppDispatch` types from the store itself
export type RootState = ReturnType<typeof store.getState>;
export type AppDispatch = typeof store.dispatch;
